import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * 用于日志记录的过程对象
 * Created by wangyg on 2016/10/13.
 */
public class RuleLog {

	private String custOrderId;

	private String staffId;

	private Date startTime;

	private long lastTime;

	private String methodName;

	private String resultCode;

	private String inParam;

	private String outParam;

	private String details;

	public String getCustOrderId() {
		return custOrderId;
	}

	public void setCustOrderId(String custOrderId) {
		this.custOrderId = custOrderId;
	}

	public String getStaffId() {
		return staffId;
	}

	public void setStaffId(String staffId) {
		this.staffId = staffId;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public long getLastTime() {
		return lastTime;
	}

	public void setLastTime(long lastTime) {
		this.lastTime = lastTime;
	}

	public String getMethodName() {
		return methodName;
	}

	public void setMethodName(String methodName) {
		this.methodName = methodName;
	}

	public String getResultCode() {
		return resultCode;
	}

	public void setResultCode(String resultCode) {
		this.resultCode = resultCode;
	}

	public String getInParam() {
		return inParam;
	}

	public void setInParam(String inParam) {
		this.inParam = inParam;
	}

	public String getOutParam() {
		return outParam;
	}

	public void setOutParam(String outParam) {
		this.outParam = outParam;
	}

	public String getDetails() {
		return details;
	}

	public void setDetails(String details) {
		this.details = details;
	}

	public static class Builder{
		private String custOrderId;

		private String staffId;

		private Date startTime;

		private long lastTime;

		private String methodName;

		private String resultCode;

		private String inParam;

		private String outParam;

		private String details;

		public Builder(){
		}

		public Builder custOrderId(String value){
			custOrderId=value;
			return this;
		}
		public Builder staffId(String value){
			staffId=value;
			return this;
		}
		public Builder startTime(Date value){
			startTime=value;
			return this;
		}
		public Builder lastTime(long value){
			lastTime=value;
			return this;
		}
		public Builder methodName(String value){
			methodName=value;
			return this;
		}
		public Builder resultCode(String value){
			resultCode=value;
			return this;
		}
		public Builder inParam(String value){
			inParam=value;
			return this;
		}
		public Builder outParam(String value){
			outParam=value;
			return this;
		}
		public Builder details(String value){
			details=value;
			return this;
		}

		public RuleLog build(){
			return new RuleLog(this);
		}
	}
	private RuleLog(Builder builder){
		custOrderId=builder.custOrderId;
		staffId=builder.staffId;
		startTime=builder.startTime;
		lastTime=builder.lastTime;
		methodName=builder.methodName;
		resultCode=builder.resultCode;
		inParam=builder.inParam;
		outParam=builder.outParam;
		details=builder.details;
	}

	public static void main(String[] args) {
		Calendar calendar=Calendar.getInstance();
		calendar.setTimeInMillis(1498550799977L);
		SimpleDateFormat sdf=new SimpleDateFormat("yyyy-mm-dd HH:MM:ss");
		System.out.println(sdf.format(calendar.getTime()));
	}
}
